package com.zhl.parameter;

public class MethodDemo1 {
    public static void main(String[] args) {
        //目的：理解方法的参数递机制:值传递
        int a = 10;
        change(a);
        System.out.println("main = " + a);   //输出结果：main = 10


    }
    public static void change(int a){
        System.out.println("change1 = " + a);   //输出结果：change1 = 10
        a = 20;
        System.out.println("cahnge2 = " + a);   //输出结果：cahnge2 = 20
    }
}
